/*
 * @Author: lanbin
 * @Date: 2021-03-11 11:32:30
 * @Last Modified by: lanbin
 * @Last Modified time: 2021-04-27 16:44:24
 */
export default {
  data() {
    return {
      isDark: true,
      placeholderGIF: 'https://ketang-pub.movtile.com/res/editor-placeholder.png',
    };
  },
  beforeDestroy() {
    this.$EventBus.$off('jm:setTheme', this.themeChange);
  },
  created() {
    this.themeChange({ data: window.$appInfo });
    this.$EventBus.$on('jm:setTheme', this.themeChange);
  },
  methods: {
    themeChange({ data }) {
      if (data) {
        this.isDark = !!(data && data.dark);
        // this.placeholderGIF = this.isDark
        //   ? 'https://ketang-pub.movtile.com/res/editor-placeholder-dark.gif'
        //   : 'https://ketang-pub.movtile.com/res/editor-placeholder.gif';
      }
    },
  },
};
